import axios from 'axios';

let base = '';
//登录
export const requestLogin = params => { return axios.post(`${base}/api/v1/doctor/doclogin`, params).then(res => res.data); };
//查询医生个人信息
export const showself = params => { return axios.get(`${base}/api/v1/doctor/querypd`, { params: params }).then(res => res.data); };
//修改医生个人信息
export const editUser = params => { return axios.put(`${base}/api/v1/doctor/updatepd`, params).then(res => res.data); };
//修改密码
export const editUserPwd = params => { return axios.get(`${base}/api/v1/doctor/updatepwd`, { params: params }).then(res => res.data); };
//查询未接收预约病号,已接收预约病号,会诊记录
export const getPatient = params => { return axios.get(`${base}/api/v1/doctor/query`, { params: params }).then(res => res.data); };
//修改病号状态（接受预约，结束会诊）
export const changestatus = params => { return axios.get(`${base}/api/v1/doctor/changestatus`, { params: params }).then(res => res.data); };
//查看会诊记录中的开药记录
export const patientRecord = params => { return axios.get(`${base}/api/v1/doctor/patientRecord`, { params: params }).then(res => res.data); };
//查看病号健康数据
export const healthData = params => { return axios.get(`${base}/api/v1/doctor/healthData`, { params: params }).then(res => res.data); };
//查看病号用药记录
export const getRecord = params => { return axios.get(`${base}/api/v1/doctor/getRecord`, { params: params }).then(res => res.data); };
//添加用药记录
export const addMdtRecord = params => { return axios.put(`${base}/api/v1/doctor/addMdtRecord`, params).then(res => res.data); };
//查询病号的挂号编号 
export const queryNid = params => { return axios.get(`${base}/api/v1/doctor/queryNid`, { params: params }).then(res => res.data); };
//查看咨询问题
export const getReply = params => { return axios.get(`${base}/api/v1/doctor/getReply`, { params: params }).then(res => res.data); };
//回复咨询 
export const addReply = params => { return axios.get(`${base}/api/v1/doctor/addReply`, { params: params }).then(res => res.data); };
//删除回复
export const removeQuery = params => { return axios.delete(`${base}/api/v1/doctor/removeQuery`, { params: params }).then(res => res.data); };
//批量删除回复
export const batchRemoveQuery = params => { return axios.delete(`${base}/api/v1/doctor/batchRemoveQuery`, { params: params }).then(res => res.data); };
//删除会诊病号
export const removePatient = params => { return axios.delete(`${base}/api/v1/doctor/removePatient`, { params: params }).then(res => res.data); };
//批量删除会诊病号
export const batchRemovePatient = params => { return axios.delete(`${base}/api/v1/doctor/batchRemovePatient`, { params: params }).then(res => res.data); };